﻿using System;

namespace Ex03.GarageLogic
{
    /// <summary>
    /// A class to deal with limits exceptions
    /// </summary>
    public class ValueOutOfRangeException : Exception
    {
        private float m_MaxValue;
        private float m_MinValue;

        /// <summary>
        /// A constructor
        /// </summary>
        /// <param name="i_Message">The message</param>
        /// <param name="i_MinValue">The low value that was reached</param>
        /// <param name="i_MaxValue">The high value that was reached</param>
        public ValueOutOfRangeException(string i_Message, float i_MinValue, float i_MaxValue) : base(i_Message)
        {
            m_MaxValue = i_MaxValue;
            m_MinValue = i_MinValue;
        }

        /// <summary>
        /// A property to get the Max Value
        /// </summary>
        public float MaxValue
        {
            get { return m_MaxValue; }
        }

        /// <summary>
        /// A property to get the Min Value
        /// </summary>
        public float MinValue
        {
            get { return m_MinValue; }
        }
    }
}
